package cn.edu.nju.ws.sview.rdf;


/**
 * @author Gong Saisai
 */
public class RDFDocument {
	private URIResource uri = null;

	/**
	 * 
	 * @param uri
	 *            ��RDF�ĵ���URI
	 */
	RDFDocument(URIResource uri) {
		this.uri = uri;
	}

	RDFDocument(String uriStr){
		URIResource uri = new URIResource(uriStr);
		this.uri = uri;
	}
	
	/**
	 * 
	 * @return ��RDF�ĵ���URI
	 */
	public URIResource getURI() {
		return this.uri;
	}

	public boolean equals(Object doc) {
		if (doc instanceof RDFDocument) {
			RDFDocument docO = (RDFDocument) doc;
			if (this.uri.equals(docO.uri)) {
				return true;
			}
		}
		return false;
	}

	public int hashCode() {
		return this.uri.hashCode();
	}

	public String toString() {
		return this.uri.toString();
	}
}